package be.nvlooy.moviereminder.service;

import java.util.List;

import be.nvlooy.moviereminder.entities.Friendship;
import be.nvlooy.moviereminder.entities.FriendshipStatus;
import be.nvlooy.moviereminder.entities.User;

public interface FriendshipService {

	/**
	 * Adds a new friendship between 2 users
	 * at this stage the frienship is flagged as "Pending" until
	 * the friendship is confirmed by the other user
	 * 
	 * @param user
	 * @param friend
	 */
	Friendship requestFriendship(User user, User friend);
	
	Friendship confirmFriendship(User user, Friendship friendshipReq);
	
	Friendship updateFriendship(Friendship friendship);

	List<Friendship> getIncomingRequests(User user);
	
	List<Friendship> getFriendships(User user, FriendshipStatus status);
	
	List<Friendship> findByName(User user, String search, FriendshipStatus status);
	
	boolean isFriendWith(User user, User friend);
	
	Friendship getFriendship(User user, User friend);
	
	Friendship getFriendshipByID(int friendshipID);

	void cancelFriendship(User user, User friend);

	void blockFriendship(Friendship friendship, boolean block);
	
}
